#include <p32xxxx.h>
#include <cp0defs.h>

  .set      noat

  la        a1,0xff200000
1:
  lw        k0,(a1)
  beqz      k0,2f
  addiu     k0,k0,-1
  beqz      k0,3f
  addiu     k0,k0,-1
  beqz      k0,4f
  
2:
  /* define load pointer */
  lw        a0,(a1)
  addiu     a2,a0,512   
  b         1b
3:
  /* load 128 32bits words */
  lw        k0,(a1)
  sw        k0,(a0)
  addiu     a0,a0,4
  bne       a0,a2,3b
  b         1b

4:
  /* jump to address */  
  lw        k0,(a1)
  jr        k0
  
